package Queue;

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main(String[] args) {
        Queue<Integer> queue = new LinkedList<>();

        Deque<Integer> queue2 = new LinkedList<>();

        Deque<Integer> queue3 = new ArrayDeque<>();
    }


    public static void main8(String[] args) {
        MyQueue queue = new MyQueue();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);

        System.out.println(queue.poll());//1
        System.out.println(queue.poll());//2
        System.out.println(queue.poll());//3
        System.out.println(queue.poll());//4
        System.out.println(queue.poll());
    }
    public static void main7(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        LinkedList<Integer> queue2 = new LinkedList<>();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);

        System.out.println(queue.poll());//1
        System.out.println(queue.peek());//2
    }

}
